import scrapy


class BqgSpider(scrapy.Spider):
    name = "bqg"
    allowed_domains = ["63c.bi00.cc"]
    start_urls = ["https://63c.bi00.cc/html/42900/"]

    def parse(self, response):
        title = response.xpath('//div[@class="book_last"]/dl/dd[2]/a/text()').get()
        next_url = response.xpath('//div[@class="book_last"]/dl/dd[2]/a/@href').get()
        print(next_url,'==================')
        yield scrapy.Request(response.urljoin(next_url),meta = {"title" : title},callback = self.parse_info)

    def parse_info(self,response):
        title = response.request.meta('title')
        print(title,'===================')
